<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- 行内js-->
<button onclick="javascript:alert('欢迎你')">按钮</button>
<!-- 引入外部js-->
<script src="main.js" type="text/javascript"></script>
</body>
</html>